#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"
namespace zkf
{
	void test1()
	{
		list<int> a;
		a.push_back(1);
		a.push_back(2);
		a.push_back(3);
		a.push_back(4);
		a.push_back(5);
		a.push_back(6);
		a.push_back(7);
		list<int>::iterator it1=a.begin();
		while (it1 != a.end())
		{
			cout << *it1<<" ";
			++it1;
		}
		cout << endl;
		a.pop_back();
		list<int>::iterator it = a.begin();
		while (it != a.end())
		{
			cout << *it << " ";
			++it;
		}
		cout << endl;
		list<int>::iterator it5 = a.begin();
		int k = 3;
		while (k--)
		{
			++it5;
		}
		a.insert(it5, 9);
		print_container(a);
		
	}
	void test2()
	{
		list<int> a;
		a.push_back(1);
		a.push_back(2);
		a.push_back(3);
		a.push_back(4);
		a.push_back(5);
		a.push_back(6);
		a.push_back(6);
		a.push_back(6);
		list<int>::iterator f=a.erase(a.begin());
		a.erase(f);
		list<int> b = a;
		for (auto e : b)
		{
			cout << e<<" ";
		}
		cout << endl;
		list<int> c;
		c = a;
		print_container(c);
	}
}
int main()
{
	zkf::test1();
	zkf::test2();
	return 0;
}
